//
//  NSObject_zframework.h
//  iOS
//
//  Created by mokai on 14-7-25.
//  Copyright (c) 2014年 cloudyoo. All rights reserved.
//

#ifndef zframework_Define
#define zframework_Define

/***
 ==============
 文件导入
 ==============
 ***/
//libs
#import "UIView+Ext.h"
#import "EncodeAndDecode.h"
#import <BlocksKit/BlocksKit.h>
#import <AFNetworking/AFNetworking.h>
#import <UIImageView+WebCache.h>
#import <MBProgressHUD/MBProgressHUD.h>
#import <SIAlertView/SIAlertView.h>
#import <FMDB/FMDB.h>
#import <IQKeyboardManager/IQKeyboardManager.h>
#import <OHAttributedLabel/OHAttributedLabel.h>

//config
#import "APPconfig.h"
#import "ThemeConfig.h"
#import "APIConfig.h"
#import "KeyConfig.h"
#import "HttpConfig.h"

//utils
#import "APPUtils.h"
#import "Location.h"
#import "AlertUtils.h"
#import "DateUtils.h"
#import "UIUtils.h"
#import "ImageUtils.h"
#import "ValidateUtils.h"

//category
#import "UIButton+zframework.h"
#import "UIViewController+zframework.h"
#import "UILabel+zframework.h"
#import "NSDate+zframework.h"

//Z
#import "F.h"
#import "M.h"
#import "S.h"

//http
#import "HttpManager.h"
#import "HttpRequest.h"
#import "HttpResponse.h"

//mvc
#import "BaseModel.h"

//other
#import "ThemeManager.h"
#import "DB.h"
#import "Data.h"


/***
 ==============
 设备信息
 ==============
 ***/
#define     ios_version         [[[UIDevice currentDevice] systemVersion] floatValue]

#define     screen_w            [UIScreen mainScreen].bounds.size.width//屏幕宽度
#define     screen_height       [UIScreen mainScreen].bounds.size.height//屏幕高度
#define     screen_h            (7.0 > ios_version ? (screen_height-20): screen_height)//兼容ios6,7的屏幕高度
#define     status_h            20.f //状态高度
#define     navbar_h            44.f //导航高度
#define     navbar_item_w       64.f //导航item宽度
#define     content_y           (7.0 >= ios_version ? 44.0:64.0)
#define     content_rect        CGRectMake(0, content_y, screen_w, screen_h-content_y)//内容ViewRect

#define     view_space          10.0f //间隔
/***
 ==============
 宏定义
 ==============
 ***/
#ifndef DEBUG
#define DEBUG YES
#endif

//日志
#ifdef DEBUG
#define NSLog(...) NSLog(__VA_ARGS__)
#define debugLog(...) NSLog(__VA_ARGS__)
#define debugMethod() NSLog(@"%s", __func__)
#else
#define debugLog(...)
#define debugMethod()
#define NSLog(...){}  
#endif

//控件对齐
#define TEXT_ALIGNMENT_CENTER (ios_version<6.0 ?UITextAlignmentCenter:NSTextAlignmentCenter )
#define TEXT_ALIGNMENT_LEFT (ios_version<6.0 ?UITextAlignmentLeft:NSTextAlignmentLeft )
#define TEXT_ALIGNMENT_RIGHT (ios_version<6.0 ?UITextAlignmentRight:NSTextAlignmentRight )

//通用的宏定义
#define     color(R, G, B, A)       [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:A]
#define     rgb_color(r,g,b,a)      [UIColor colorWithRed:(r) / 255.0 green:(g) / 255.0 blue:(b) / 255.0 alpha:a]
#define     sa_color(s,a)            [UIColor colorWithRed:(s) / 255.0 green:(s) / 255.0 blue:(s) / 255.0 alpha:a]

//字体
#define     font(size)         [UIFont systemFontOfSize:size]
#define     fontBold(size)     [UIFont boldSystemFontOfSize:size]



#endif